/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.squirrelm.my;

import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import java.util.TimeZone;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @author Administrator
 */
@Configuration
public class AppConfig {

    /**
     * Google's UserService is part of a jar, so we cannot use
     * Spring's "component scanning".  Thus, we explicitly
     * declare it as a bean for DI.
     */
    @Bean
    public UserService userService()
    {
        return UserServiceFactory.getUserService();
    }

    @Bean
    public TimeZone timeZone()
    {
        return TimeZone.getTimeZone("Asia/Shanghai");
    }
}
